package com.szq.pattern.interceptor.impl;

import com.szq.pattern.interceptor.HandlerInterceptor;

/**
 * @description:
 * @author: szq
 * @date: 2021-09-09 08:57:10
 */
public class SsoInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(String request, String response, Object handler) {
        // 模拟获取cookie
        String ticket = request.substring(1, 8);
        // 模拟校验
        return ticket.equals("success");
    }
}
